﻿using System;
using System.Data;
using System.Data.Common;
using Liger.Common;
using Liger.Data;

namespace EasyFMS.Model
{

	/// <summary>
	/// 实体类oOrder
	/// </summary>
	[Serializable]
	public class oOrder : Entity 
	{ 
		 public oOrder() 
            : base("oOrder") 
        { 

        }


		#region Model
		private int _UID;
		private string _OrderNo;
		private string _DeptCode1;
		private string _DeptName1;
		private string _DeptCode2;
		private string _DeptName2;
		private string _CustomerCode;
		private string _CustomerName;
		private string _CustomerNo;
		private string _DealinCode;
		private string _DealinName;
		private string _AcceptDate;
		private int? _OrderType;
		private string _OrderDate;
		private string _GoodsName;
		private string _Conveyance;
		private string _ContractNo;
		private string _HawbNo;
		private string _MawbNo;
		private string _DeclareNo;
		private int? _Piece;
		private int? _TEU;
		private string _GrossWeight;
		private string _ChgWeight;
		private string _Volume;
		private int? _UserSalesID;
		private string _AmountGet;
		private string _AmountGR;
		private string _AmountPay;
		private string _AmountPR;
		private bool? _IsSelect;
		private int? _UserCreateID;
		private string _CreateDate;
		private int? _UserModifyID;
		private string _ModifyDate;
	 
		/// <summary>
		/// 
		/// </summary>
		public int UID
		{
			get{ return _UID; }
			set
			{
				this.OnPropertyValueChange(_.UID,_UID,value);
				this._UID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string OrderNo
		{
			get{ return _OrderNo; }
			set
			{
				this.OnPropertyValueChange(_.OrderNo,_OrderNo,value);
				this._OrderNo = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string DeptCode1
		{
			get{ return _DeptCode1; }
			set
			{
				this.OnPropertyValueChange(_.DeptCode1,_DeptCode1,value);
				this._DeptCode1 = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string DeptName1
		{
			get{ return _DeptName1; }
			set
			{
				this.OnPropertyValueChange(_.DeptName1,_DeptName1,value);
				this._DeptName1 = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string DeptCode2
		{
			get{ return _DeptCode2; }
			set
			{
				this.OnPropertyValueChange(_.DeptCode2,_DeptCode2,value);
				this._DeptCode2 = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string DeptName2
		{
			get{ return _DeptName2; }
			set
			{
				this.OnPropertyValueChange(_.DeptName2,_DeptName2,value);
				this._DeptName2 = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string CustomerCode
		{
			get{ return _CustomerCode; }
			set
			{
				this.OnPropertyValueChange(_.CustomerCode,_CustomerCode,value);
				this._CustomerCode = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string CustomerName
		{
			get{ return _CustomerName; }
			set
			{
				this.OnPropertyValueChange(_.CustomerName,_CustomerName,value);
				this._CustomerName = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string CustomerNo
		{
			get{ return _CustomerNo; }
			set
			{
				this.OnPropertyValueChange(_.CustomerNo,_CustomerNo,value);
				this._CustomerNo = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string DealinCode
		{
			get{ return _DealinCode; }
			set
			{
				this.OnPropertyValueChange(_.DealinCode,_DealinCode,value);
				this._DealinCode = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string DealinName
		{
			get{ return _DealinName; }
			set
			{
				this.OnPropertyValueChange(_.DealinName,_DealinName,value);
				this._DealinName = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string AcceptDate
		{
			get{ return _AcceptDate; }
			set
			{
				this.OnPropertyValueChange(_.AcceptDate,_AcceptDate,value);
				this._AcceptDate = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? OrderType
		{
			get{ return _OrderType; }
			set
			{
				this.OnPropertyValueChange(_.OrderType,_OrderType,value);
				this._OrderType = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string OrderDate
		{
			get{ return _OrderDate; }
			set
			{
				this.OnPropertyValueChange(_.OrderDate,_OrderDate,value);
				this._OrderDate = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string GoodsName
		{
			get{ return _GoodsName; }
			set
			{
				this.OnPropertyValueChange(_.GoodsName,_GoodsName,value);
				this._GoodsName = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Conveyance
		{
			get{ return _Conveyance; }
			set
			{
				this.OnPropertyValueChange(_.Conveyance,_Conveyance,value);
				this._Conveyance = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string ContractNo
		{
			get{ return _ContractNo; }
			set
			{
				this.OnPropertyValueChange(_.ContractNo,_ContractNo,value);
				this._ContractNo = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string HawbNo
		{
			get{ return _HawbNo; }
			set
			{
				this.OnPropertyValueChange(_.HawbNo,_HawbNo,value);
				this._HawbNo = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string MawbNo
		{
			get{ return _MawbNo; }
			set
			{
				this.OnPropertyValueChange(_.MawbNo,_MawbNo,value);
				this._MawbNo = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string DeclareNo
		{
			get{ return _DeclareNo; }
			set
			{
				this.OnPropertyValueChange(_.DeclareNo,_DeclareNo,value);
				this._DeclareNo = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? Piece
		{
			get{ return _Piece; }
			set
			{
				this.OnPropertyValueChange(_.Piece,_Piece,value);
				this._Piece = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? TEU
		{
			get{ return _TEU; }
			set
			{
				this.OnPropertyValueChange(_.TEU,_TEU,value);
				this._TEU = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string GrossWeight
		{
			get{ return _GrossWeight; }
			set
			{
				this.OnPropertyValueChange(_.GrossWeight,_GrossWeight,value);
				this._GrossWeight = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string ChgWeight
		{
			get{ return _ChgWeight; }
			set
			{
				this.OnPropertyValueChange(_.ChgWeight,_ChgWeight,value);
				this._ChgWeight = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Volume
		{
			get{ return _Volume; }
			set
			{
				this.OnPropertyValueChange(_.Volume,_Volume,value);
				this._Volume = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? UserSalesID
		{
			get{ return _UserSalesID; }
			set
			{
				this.OnPropertyValueChange(_.UserSalesID,_UserSalesID,value);
				this._UserSalesID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string AmountGet
		{
			get{ return _AmountGet; }
			set
			{
				this.OnPropertyValueChange(_.AmountGet,_AmountGet,value);
				this._AmountGet = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string AmountGR
		{
			get{ return _AmountGR; }
			set
			{
				this.OnPropertyValueChange(_.AmountGR,_AmountGR,value);
				this._AmountGR = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string AmountPay
		{
			get{ return _AmountPay; }
			set
			{
				this.OnPropertyValueChange(_.AmountPay,_AmountPay,value);
				this._AmountPay = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string AmountPR
		{
			get{ return _AmountPR; }
			set
			{
				this.OnPropertyValueChange(_.AmountPR,_AmountPR,value);
				this._AmountPR = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public bool? IsSelect
		{
			get{ return _IsSelect; }
			set
			{
				this.OnPropertyValueChange(_.IsSelect,_IsSelect,value);
				this._IsSelect = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? UserCreateID
		{
			get{ return _UserCreateID; }
			set
			{
				this.OnPropertyValueChange(_.UserCreateID,_UserCreateID,value);
				this._UserCreateID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string CreateDate
		{
			get{ return _CreateDate; }
			set
			{
				this.OnPropertyValueChange(_.CreateDate,_CreateDate,value);
				this._CreateDate = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? UserModifyID
		{
			get{ return _UserModifyID; }
			set
			{
				this.OnPropertyValueChange(_.UserModifyID,_UserModifyID,value);
				this._UserModifyID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string ModifyDate
		{
			get{ return _ModifyDate; }
			set
			{
				this.OnPropertyValueChange(_.ModifyDate,_ModifyDate,value);
				this._ModifyDate = value;
			}
		}
		#endregion

		#region Method
		/// <summary>
		/// 获取实体中的标识列
		/// </summary>
		public override Field GetIdentityField()
		{
			return _.UID;
		}
		/// <summary>
		/// 获取实体中的主键列
		/// </summary>
		public override Field[] GetPrimaryKeyFields()
		{
			return new Field[] {
				_.UID			};
		}
		/// <summary>
		/// 获取列信息
		/// </summary>
		public override Field[] GetFields()
		{
			return new Field[] {
				_.UID,
				_.OrderNo,
				_.DeptCode1,
				_.DeptName1,
				_.DeptCode2,
				_.DeptName2,
				_.CustomerCode,
				_.CustomerName,
				_.CustomerNo,
				_.DealinCode,
				_.DealinName,
				_.AcceptDate,
				_.OrderType,
				_.OrderDate,
				_.GoodsName,
				_.Conveyance,
				_.ContractNo,
				_.HawbNo,
				_.MawbNo,
				_.DeclareNo,
				_.Piece,
				_.TEU,
				_.GrossWeight,
				_.ChgWeight,
				_.Volume,
				_.UserSalesID,
				_.AmountGet,
				_.AmountGR,
				_.AmountPay,
				_.AmountPR,
				_.IsSelect,
				_.UserCreateID,
				_.CreateDate,
				_.UserModifyID,
				_.ModifyDate
			};
		}
		/// <summary>
		/// 获取值信息
		/// </summary>
		public override object[] GetValues()
		{
			return new object[] {
				_UID,
				_OrderNo,
				_DeptCode1,
				_DeptName1,
				_DeptCode2,
				_DeptName2,
				_CustomerCode,
				_CustomerName,
				_CustomerNo,
				_DealinCode,
				_DealinName,
				_AcceptDate,
				_OrderType,
				_OrderDate,
				_GoodsName,
				_Conveyance,
				_ContractNo,
				_HawbNo,
				_MawbNo,
				_DeclareNo,
				_Piece,
				_TEU,
				_GrossWeight,
				_ChgWeight,
				_Volume,
				_UserSalesID,
				_AmountGet,
				_AmountGR,
				_AmountPay,
				_AmountPR,
				_IsSelect,
				_UserCreateID,
				_CreateDate,
				_UserModifyID,
				_ModifyDate
			};
		} 
		/// <summary>
		/// 设置字段值
		/// </summary>
		public override void SetValue(string fieldName, object value)
        {
            switch (fieldName)
            { 
				case "UID":
                    this._UID = DataHelper.ConvertValue<int>(value);
                    break; 
				case "OrderNo":
                    this._OrderNo = DataHelper.ConvertValue<string>(value);
                    break; 
				case "DeptCode1":
                    this._DeptCode1 = DataHelper.ConvertValue<string>(value);
                    break; 
				case "DeptName1":
                    this._DeptName1 = DataHelper.ConvertValue<string>(value);
                    break; 
				case "DeptCode2":
                    this._DeptCode2 = DataHelper.ConvertValue<string>(value);
                    break; 
				case "DeptName2":
                    this._DeptName2 = DataHelper.ConvertValue<string>(value);
                    break; 
				case "CustomerCode":
                    this._CustomerCode = DataHelper.ConvertValue<string>(value);
                    break; 
				case "CustomerName":
                    this._CustomerName = DataHelper.ConvertValue<string>(value);
                    break; 
				case "CustomerNo":
                    this._CustomerNo = DataHelper.ConvertValue<string>(value);
                    break; 
				case "DealinCode":
                    this._DealinCode = DataHelper.ConvertValue<string>(value);
                    break; 
				case "DealinName":
                    this._DealinName = DataHelper.ConvertValue<string>(value);
                    break; 
				case "AcceptDate":
                    this._AcceptDate = DataHelper.ConvertValue<string>(value);
                    break; 
				case "OrderType":
                    this._OrderType = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "OrderDate":
                    this._OrderDate = DataHelper.ConvertValue<string>(value);
                    break; 
				case "GoodsName":
                    this._GoodsName = DataHelper.ConvertValue<string>(value);
                    break; 
				case "Conveyance":
                    this._Conveyance = DataHelper.ConvertValue<string>(value);
                    break; 
				case "ContractNo":
                    this._ContractNo = DataHelper.ConvertValue<string>(value);
                    break; 
				case "HawbNo":
                    this._HawbNo = DataHelper.ConvertValue<string>(value);
                    break; 
				case "MawbNo":
                    this._MawbNo = DataHelper.ConvertValue<string>(value);
                    break; 
				case "DeclareNo":
                    this._DeclareNo = DataHelper.ConvertValue<string>(value);
                    break; 
				case "Piece":
                    this._Piece = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "TEU":
                    this._TEU = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "GrossWeight":
                    this._GrossWeight = DataHelper.ConvertValue<string>(value);
                    break; 
				case "ChgWeight":
                    this._ChgWeight = DataHelper.ConvertValue<string>(value);
                    break; 
				case "Volume":
                    this._Volume = DataHelper.ConvertValue<string>(value);
                    break; 
				case "UserSalesID":
                    this._UserSalesID = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "AmountGet":
                    this._AmountGet = DataHelper.ConvertValue<string>(value);
                    break; 
				case "AmountGR":
                    this._AmountGR = DataHelper.ConvertValue<string>(value);
                    break; 
				case "AmountPay":
                    this._AmountPay = DataHelper.ConvertValue<string>(value);
                    break; 
				case "AmountPR":
                    this._AmountPR = DataHelper.ConvertValue<string>(value);
                    break; 
				case "IsSelect":
                    this._IsSelect = DataHelper.ConvertValue<bool?>(value);
                    break; 
				case "UserCreateID":
                    this._UserCreateID = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "CreateDate":
                    this._CreateDate = DataHelper.ConvertValue<string>(value);
                    break; 
				case "UserModifyID":
                    this._UserModifyID = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "ModifyDate":
                    this._ModifyDate = DataHelper.ConvertValue<string>(value);
                    break; 
            }
        }
		/// <summary>
		/// 获取字段值
		/// </summary>
        public override object GetValue(string fieldName)
        {
            switch (fieldName)
            { 
				case "UID":
                    return this._UID; 
				case "OrderNo":
                    return this._OrderNo; 
				case "DeptCode1":
                    return this._DeptCode1; 
				case "DeptName1":
                    return this._DeptName1; 
				case "DeptCode2":
                    return this._DeptCode2; 
				case "DeptName2":
                    return this._DeptName2; 
				case "CustomerCode":
                    return this._CustomerCode; 
				case "CustomerName":
                    return this._CustomerName; 
				case "CustomerNo":
                    return this._CustomerNo; 
				case "DealinCode":
                    return this._DealinCode; 
				case "DealinName":
                    return this._DealinName; 
				case "AcceptDate":
                    return this._AcceptDate; 
				case "OrderType":
                    return this._OrderType; 
				case "OrderDate":
                    return this._OrderDate; 
				case "GoodsName":
                    return this._GoodsName; 
				case "Conveyance":
                    return this._Conveyance; 
				case "ContractNo":
                    return this._ContractNo; 
				case "HawbNo":
                    return this._HawbNo; 
				case "MawbNo":
                    return this._MawbNo; 
				case "DeclareNo":
                    return this._DeclareNo; 
				case "Piece":
                    return this._Piece; 
				case "TEU":
                    return this._TEU; 
				case "GrossWeight":
                    return this._GrossWeight; 
				case "ChgWeight":
                    return this._ChgWeight; 
				case "Volume":
                    return this._Volume; 
				case "UserSalesID":
                    return this._UserSalesID; 
				case "AmountGet":
                    return this._AmountGet; 
				case "AmountGR":
                    return this._AmountGR; 
				case "AmountPay":
                    return this._AmountPay; 
				case "AmountPR":
                    return this._AmountPR; 
				case "IsSelect":
                    return this._IsSelect; 
				case "UserCreateID":
                    return this._UserCreateID; 
				case "CreateDate":
                    return this._CreateDate; 
				case "UserModifyID":
                    return this._UserModifyID; 
				case "ModifyDate":
                    return this._ModifyDate; 
				default :
                    return null;
            } 
        }



		#endregion

		#region _Field
		/// <summary>
		/// 字段信息
		/// </summary>
		public class _
		{
			/// <summary>
			/// * 
			/// </summary>
			public readonly static Field All = new Field("*","oOrder");
 
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UID = new Field("UID","oOrder","UID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field OrderNo = new Field("OrderNo","oOrder","OrderNo");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field DeptCode1 = new Field("DeptCode1","oOrder","DeptCode1");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field DeptName1 = new Field("DeptName1","oOrder","DeptName1");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field DeptCode2 = new Field("DeptCode2","oOrder","DeptCode2");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field DeptName2 = new Field("DeptName2","oOrder","DeptName2");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field CustomerCode = new Field("CustomerCode","oOrder","CustomerCode");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field CustomerName = new Field("CustomerName","oOrder","CustomerName");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field CustomerNo = new Field("CustomerNo","oOrder","CustomerNo");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field DealinCode = new Field("DealinCode","oOrder","DealinCode");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field DealinName = new Field("DealinName","oOrder","DealinName");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field AcceptDate = new Field("AcceptDate","oOrder","AcceptDate");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field OrderType = new Field("OrderType","oOrder","OrderType");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field OrderDate = new Field("OrderDate","oOrder","OrderDate");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field GoodsName = new Field("GoodsName","oOrder","GoodsName");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Conveyance = new Field("Conveyance","oOrder","Conveyance");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field ContractNo = new Field("ContractNo","oOrder","ContractNo");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field HawbNo = new Field("HawbNo","oOrder","HawbNo");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field MawbNo = new Field("MawbNo","oOrder","MawbNo");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field DeclareNo = new Field("DeclareNo","oOrder","DeclareNo");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Piece = new Field("Piece","oOrder","Piece");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field TEU = new Field("TEU","oOrder","TEU");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field GrossWeight = new Field("GrossWeight","oOrder","GrossWeight");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field ChgWeight = new Field("ChgWeight","oOrder","ChgWeight");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Volume = new Field("Volume","oOrder","Volume");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UserSalesID = new Field("UserSalesID","oOrder","UserSalesID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field AmountGet = new Field("AmountGet","oOrder","AmountGet");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field AmountGR = new Field("AmountGR","oOrder","AmountGR");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field AmountPay = new Field("AmountPay","oOrder","AmountPay");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field AmountPR = new Field("AmountPR","oOrder","AmountPR");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field IsSelect = new Field("IsSelect","oOrder","IsSelect");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UserCreateID = new Field("UserCreateID","oOrder","UserCreateID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field CreateDate = new Field("CreateDate","oOrder","CreateDate");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UserModifyID = new Field("UserModifyID","oOrder","UserModifyID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field ModifyDate = new Field("ModifyDate","oOrder","ModifyDate");
		}
		#endregion

 
	}
}

